package com.lance.answer.gui.answer;

import org.apache.commons.io.IOUtils;

import java.io.InputStream;
import java.util.List;
import java.util.Map;

public class AnswerMulptliUser {

    public static void answer(List<String> urlTasks,Map<String,AnswerObject> answers,String subjectCode,String driverPath,String userName,String password) throws Exception {
        InputStream inputStream2 = Thread.currentThread().getContextClassLoader().getResourceAsStream( subjectCode + "/" + subjectCode +".user");
        List<String> users = IOUtils.readLines(inputStream2,"utf-8");
        for (String user:users) {
            String[] strs = user.split(",");
            String userCode = strs[1];
            String pwd = strs[2];
            AdminBasicTest2AndAnswerNew.run(urlTasks,answers,subjectCode,null,userCode,pwd);
        }

    }

}
